<template>
  <div class="homeRecmond">
        <div class="recomond-title">热销推荐</div>
        <ul>
            <li class="item" v-for="item in recomondList" :key="item.id"> 
                <div class="item-img-wrapper">
                    <img class="item-img" :src="item.imgUrl">
                </div>
                <div class="item-info">
                    <p class="item-title item-ellipsis">{{item.title}}</p>
                    <p class="item-review">{{item.review}}</p>
                    <p class="item-price">{{item.price}}</p>

                </div>

            </li>
        </ul>
  </div>
</template>
<script>
export default {
  name: "homeRecmond",
  data() {
    return {
       recomondList:[
           {
               id:'01',
               imgUrl:'http://img1.qunarzz.com/sight/p0/1712/95/95f38f28a6ff19cba3.img.jpg_200x200_af967e35.jpg',
               title:'水奥雪世界',
               review:'79条评论',
               price:'¥9.9'
           },
            {
               id:'02',
               imgUrl:'http://img1.qunarzz.com/sight/p0/1511/d2/d2aec2dfc5aa771290.water.jpg_200x200_69e4a80d.jpg',
               title:'南山滑雪场',
               review:'1454条评论',
               price:'¥120'
           },
            {
               id:'03',
               imgUrl:'http://img1.qunarzz.com/sight/p0/1511/d2/d2aec2dfc5aa771290.water.jpg_200x200_69e4a80d.jpg',
               title:'南山滑雪场',
               review:'1454条评论',
               price:'¥120'
           }
       ]
    };
  },

};
</script>

<style>
.recomond-title{
    height: .8rem;
    padding-left: .26rem;
    line-height: .8rem;
    color: #212121;
    background: #eee ;
}
.item{
    width: 100%;
    display: flex;
    overflow: hidden;
    position: relative;
    overflow: hidden;
    padding: .2rem;
    height: 2.4rem;
    box-sizing: border-box;
}
.item-img-wrapper{
    width: 2rem;
    height: 2rem;
}
.item-img-wrapper img{
    width: 100%;
}
.item-info{
    overflow: hidden;
    padding-left: .22rem;
    min-width: 0;
}
.item-title {
    margin-top: .26rem;
    height: .44rem;
    color: #212121;
    font-size: .32rem;
    line-height: .44rem;
}
.item-ellipsis{
    overflow: hidden;
    width: 100%;
    /* 超出的字。。。代替 */
    white-space: nowrap;
    text-overflow: ellipsis;
}
.item-review{
    margin-top: .14rem;
    height: .34rem;
    color: #616161;
    font-size: .24rem;
    line-height: .34rem;
    vertical-align: text-bottom;
}
.item-price{
    color: #ff8300;
    font-size: .24rem;
    line-height: .4rem;
    position: relative;
    margin-top: .22rem;
    font-size: .24rem;
    line-height: .4rem;
}
</style>